/*
-----------------------------------------------------------------------------
This file is part of NxGraphics, Multimedia Engine.
Author : Stephane Kyles. Developed in Prague, Czech Republic.
				_   __      _    __ _      __           
			   / | / /_  __| |  / /(_)____/ /___   ____ 
			  /  |/ /| |/_/| | / // // __  // _ \ / __ \
			 / /|  /_>  <  | |/ // // /_/ //  __// /_/ /
			/_/ |_//_/|_|  |___//_/ \__,_/ \___/ \____/ 

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __NXVIDEO_H__
#define __NXVIDEO_H__

#include "NxVideo_Prerequisites.h"

namespace NxVideo_Namespace {

//!  Main Interface for NxVideo
/*!
	NxVideoManager Class Implementation.
*/
class NxVideo_Export NxVideoManager : public Singleton<NxVideoManager>  
{
public :
	//! NxVideo manager Class Constructor.
	NxVideoManager();
	//! NxVideo manager Class Deconstructor.
	~NxVideoManager();
	//! NxVideo manager Class Singleton.
	static NxVideoManager& getSingleton();
	//! NxVideo manager Class Singleton.
	static NxVideoManager* getSingletonPtr();
	//! Open A video File.
	NxVideo_Player * OpenVideoFile( const std::string& Filename, int Width, int Height );
	//! Open A browser Page.
	NxVideo_Player * OpenBrowserPage( const std::string& Link, int Width, int Height );
	//! Open A browser File.
	NxVideo_Player * OpenBrowserFile( const std::string& File, int Width, int Height );
	//! Close a File.
	bool CloseVideoFile( NxVideo_Player * File );
	//! Get Available DirectShow Camera List.
	void GetCameraNamesDS( std::vector<std::string> & CameraList );
	//! Get Available Video For Windows Camera List.
	void GetCameraNamesVFW( std::vector<std::string> & CameraList );
	//! Get Available Point Grey Research Camera List.
	void GetCameraNamesPGR( std::vector<unsigned long> & CameraList );
	//! Get Number of Available DirectShow Cameras.
	unsigned int GetNumCamerasDS();
	//! Get Number of Available Point Grey Research Cameras.
	unsigned int GetNumCamerasPGR();
	//! Get Number of Available Video For Windows Cameras.
	unsigned int GetNumCameraVFW();
	//! Get Camera Index From Name.
	unsigned long GetCameraIndexFromName( const std::string & CameraName, NxVideoCaptureDeviceType CameraType );
	//! Quicktime Installed ?
	bool IsQuicktimeEnabled();
};

template<> NxVideoManager * NxVideo_Namespace::Singleton<NxVideoManager>::ms_Singleton = 0;

}

#endif



